# coding=UTF-8
from const_ import *
with open("./data_test.txt") as f:
    lines = f.readlines()

with open("real_test.txt",mode="w") as f:
    f.write("text")
    f.write("\n")
    for i,item in enumerate(lines):
        if i%3==0:
            question = extract_question(item)
            entity_list = predict_question_entities(question)
            question = update_question(question, entity_list)
            question = replace_number_and_date_after_entity_removed(question)
            f.write(question)
            f.write("\n")

